CC=gcc
CFLAGS=-lrt -lpthread -Wall -DDEBUG
BINARY=ping-local
SYSTEM=POSIX

all: clean compile

compile:
	$(CC) $(CFLAGS) -DDEBUG=1 -D$(SYSTEM)=1 -o $(BINARY) ping.c \
											-I../../../include/ \
											-Igenerated/nodea/ \
											../../../src/po_hi_task.c \
											../../../src/po_hi_main.c \
											../../../src/po_hi_time.c \
											../../../src/po_hi_messages.c \
											../../../src/po_hi_marshallers.c \
											../../../src/po_hi_transport.c \
											../../../src/po_hi_transport_sockets.c \
											../../../src/po_hi_giop.c \
											../../../src/po_hi_gqueue.c \
											../../../src/po_hi_protocols.c \
											generated/nodea/activity.c \
											generated/nodea/main.c \
											generated/nodea/marshallers.c \
											generated/nodea/naming.c \
											generated/nodea/request.c \
											generated/nodea/subprograms.c \
											generated/nodea/types.c \
											generated/nodea/deployment.c 

clean:
	find . -name '*.o' | xargs rm -f
	find . -name '*~' | xargs rm -f
	rm -f $(BINARY)
